﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace FTchinaMVC.Models
{
    public class Book
    {
        [Key]
        public int BookID { get; set; }
        [Required]
        [Display(Name = "书名")]
        public string BookName { get; set; }
        [Display(Name = "作者")]
        public string Author { get; set; }
        [Display(Name = "出版商")]
        public string Publisher { get; set; }
        [Display(Name = "价格")]
        public decimal Price { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }
    }


    /// <summary>
    /// 菜单列表
    /// </summary>
    public class Menu
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "父ID")]
        public int ParentID { get; set; }
        [Required]
        [Display(Name = "菜单名称")]
        public string MenuName { get; set; }
        [Display(Name = "路径")]
        public string Controller { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }
    }
    /// <summary>
    /// Action 权限列表
    /// </summary>
    public class ActionPermission
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "Controller")]
        public string Controller { get; set; }
        [Display(Name = "Action")]
        public string Action { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }
    }

    /// <summary>
    /// 用户角色
    /// </summary>
    public class UserRole
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "角色名称")]
        public string RoleName { get; set; }
    }
    /// <summary>
    /// 用户
    /// </summary>
    public class User
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "登陆昵称")]
        public string NickName { get; set; }
        [Display(Name = "密码")]
        public string PassWord { get; set; }
        [Display(Name = "用户角色ID")]
        public int UserRoleID { get; set; }
        [Display(Name = "用户组织架构ID")]
        public int UserDepartmentID { get; set; }
    }
    /// <summary>
    /// 用户部门
    /// </summary>
    public class UserDepartment
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "父ID")]
        public int ParentID { get; set; }
        [Display(Name = "名称")]
        public string Name { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }
    }
    /// <summary>
    /// 用户登录历史
    /// </summary>
    public class UserLogin_Log
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "用户组织架构ID")]
        public int UserDepartmentID { get; set; }
        [Display(Name = "登录IP")]
        public string LoginIP { get; set; }
        [Display(Name = "登录时间")]
        public DateTime LoginDate { get; set; }
    }
    /// <summary>
    /// 用户操作历史
    /// </summary>
    public class UserOperation_log
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "用户组织架构ID")]
        public int UserDepartmentID { get; set; }
        [Display(Name = "用户昵称")]
        public string UserNikeName { get; set; }
        [Display(Name = "Controller")]
        public string Controller { get; set; }
        [Display(Name = "Action")]
        public string Action { get; set; }
        [Display(Name = "操作内容")]
        public string UserOperation { get; set; }
        [Display(Name = "操作IP")]
        public string OperationIP { get; set; }
        [Display(Name = "操作时间")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd HH:mm:ss}")]
        public DateTime OperationDate { get; set; }
    }

    /// <summary>
    /// 用户角色关系
    /// </summary>
    public class User_UserRole
    {
        [Key]
        public int ID { get; set; }

    }
}